﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace FileManager_Client.PresentationLayer.NewUi
{
    public partial class ChangeRoleForm : BaseForm
    {
        #region Form Constructor
        public bool IsJustMe { get; set; }
        public bool IsCreate { get; set; }
        public bool IsRead { get; set; }
        public bool IsUpdate { get; set; }
        public bool IsDelete { get; set; }
        public bool UpdateSubFolder { get; set; }
        public bool IsSave { get; set; }

        public ChangeRoleForm(bool isDelete, bool isCreate, bool isJustMe, bool isRead, bool isUpdate)
        {
            InitializeComponent();
            cb_Delete.Checked = isDelete;
            cb_Update.Checked = isUpdate;
            cb_Read.Checked = isRead;
            cb_IsCreate.Checked = isCreate;
            cb_IsJustMe.Checked = isJustMe;
        }
        #endregion

        #region Button Confirm Event
        private void btn_Confrim_Click(object sender, EventArgs e)
        {
            IsSave = true;
            UpdateSubFolder = cb_SubFolderChange.Checked;
            IsJustMe = cb_IsJustMe.Checked;
            IsCreate = cb_IsCreate.Checked;
            IsRead = cb_Read.Checked;
            IsUpdate = cb_Update.Checked;
            IsDelete = cb_Delete.Checked;
            Close();
        }
        #endregion
    }
}